package com.itheima.a05myset;

import java.util.HashMap;
import java.util.HashSet;

public class A03_HashSetDemo3 {
    public static void main(String[] args) {
        Student s1=new Student("zhangsan",23);
        Student s2=new Student("lisi",24);
        Student s3=new Student("wangwu",25);
        Student s4=new Student("zhangsan",23);


        HashSet<Student> set=new HashSet<>();
        System.out.println(set.add(s1));
        System.out.println(set.add(s2));
        System.out.println(set.add(s3));
        System.out.println(set.add(s4));

        System.out.println(set);
    }
}
